﻿using System;
using System.Linq;
using System.Collections.Generic;
using FizzWare.NBuilder;
using Framework.Common.Extention;
namespace Framework.Sample
{
    public class Program
    {
        static void Main(string[] args)
        {
            var list = Framework.Common.Sql.SqlServerHelper.ExecuteReader(
                       "server=.;database=iislog;uid=sa;pwd=sa",
                        System.Data.CommandType.Text,
                        @"SELECT  logtime ,
        cs_uri_stem ,
        cs_uri_query ,
        time_taken ,
        fullurl = 'http://mymoney.hexun.com' + cs_uri_stem + '?'
        + cs_uri_query
FROM    dbo.log0807
ORDER BY time_taken DESC").ToList<Result>();

            var list1 = Framework.Common.Sql.SqlServerHelper.ExecuteReader(
                      "server=.;database=iislog;uid=sa;pwd=sa",
                       System.Data.CommandType.Text,
                       @"SELECT  logtime ,
        cs_uri_stem ,
        cs_uri_query ,
        time_taken ,
        fullurl = 'http://mymoney.hexun.com' + cs_uri_stem + '?'
        + cs_uri_query
FROM    dbo.log0807
ORDER BY time_taken DESC").ToList<Result1>();

            Console.Read();
        }

        public class Result
        {
            public DateTime logtime { get; set; }
            public string cs_uri_stem { get; set; }
            public string cs_uri_query { get; set; }
            public long time_taken { get; set; }
            public string fullurl { get; set; }
        }

        public class Result1
        {
            public DateTime logtime { get; set; }
            public string cs_uri_stem { get; set; }
            public string cs_uri_query { get; set; }
            public long time_taken { get; set; }
            public string fullurl { get; set; }
        }
    }

    public interface ITest
    {
        void Test();
    }


    public class TestClass
    {
        public int Age { get; set; }
        public string Name { get; set; }
    }
}
